package com.dfbz.service;

import com.dfbz.dao.UserfocusdDao;
import com.dfbz.entity.Userfocus;

import java.util.List;

public class UserfocusService {
    private UserfocusdDao userfocusdDao = new UserfocusdDao();

    /**
     * 判断我是否关注该用户
     * @param uid
     * @param fid
     * @return
     */
    public Userfocus findAttention(long uid, long fid) {
       return userfocusdDao.findAttention(uid,fid);
    }

    /**
     * 关注用户
     * @param uid
     * @param fid
     */
    public void addUserfocus(long uid, long fid) {
        userfocusdDao.addUserfocus( uid,fid);
    }
    /**
     * 取消关注用户
     * @param uid
     * @param fid
     */
    public void removeUserfocus(long uid, long fid) {
        userfocusdDao.removeUserfocus(uid,fid);
    }

    /**
     * 查询我的所有粉丝(哪些人关注了我)
     * @param id
     * @return
     */
    public List<Userfocus> findFansListById(Long id) {
        return userfocusdDao.findFansListById(id);
    }
}
